package Dynamic;

import java.lang.reflect.Proxy;

public class client {
    public static void main(String[] args) {
        AbstractLog realService = new BusinessClass();
        AbstractLog proxy = (AbstractLog) Proxy.newProxyInstance(
                AbstractLog.class.getClassLoader(),
                new Class<?>[]{AbstractLog.class},
                new LoggerProxy(realService)
        );

        proxy.method();
    }
}
